<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<a th:href="@{/exam/add}">添加新的题目</a>
<table border="1">
    <tr th:each="item, state : ${answerState}">
        <td th:text="${state.index}"></td>
        <td>
            <a th:href="@{/exam/question/{qid}(qid=${item.key.qid})}"><span th:text="${item.key.getQInfo()}"></span></a>
        </td>
        <td th:switch="${item.value}" >
            <p th:case="null"> NULL</p>
            <p th:case="true"> YES</p>
            <p th:case="false"> NO</p>
        </td>
        <td>
            <a th:href="@{/exam/update(qid=${item.key.qid})}">编辑</a>
        </td>
        <td>
            <a th:href="@{/exam/del/{qid}(qid=${item.key.qid})}">删除</a>
        </td>
    </tr>
</table>
</body>
</html>